<template>
  <div
    class="jy-style-height copyright-box"
    :style="{
      'background-image': `url(${publicUrls + 'free/style8/publicStyle8Bg2.png' + '?imageView2/3/format/webp'})`,
    }"
  >
    <div class="cultural-bg">
      <div class="copyright-heard">
        <img class="backHome" @click="blankHome" :src="publicUrls + 'free/style8/backHome.png'" alt="" />
        <div class="heard-title">
          <img :src="publicUrls + 'free/style8/exhibitTitleBg.png'" alt="" />版权声明<img
            :src="publicUrls + 'free/style8/exhibitTitleBg2.png'"
            alt=""
          />
        </div>
        <div class="backHome"></div>
      </div>
      <div class="copyright-content">
        <div class="border"></div>
        <scrollBox
          color="rgba(33, 57, 47, 0.59)"
          v-if="Scrollheights"
          :remarks="commonStore.copyrightInfo"
          :byid="234"
          :height="getScrollWComputed"
          :scroll-src="publicUrls + 'free/style8/scrollBar.png'"
        >
          <template #solidBorder>
            <div class="solidBorder-child"></div>
          </template>
        </scrollBox>
      </div>
      <div class="content-door">
        <i class="iconfonts">&#xe6dd;</i>
        <span>永不落幕的展览与展示平台</span>
      </div>
      <!-- <div class="unit-exbit-upbg">
        <div class="border"></div>
      </div> -->
    </div>
    <MenuNavigation />
  </div>
</template>

<script lang="ts">
export default defineComponent({
  name: 'style8',
});
</script>

<script setup lang="ts">
import { publicUrls } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
import { defineComponent, nextTick, ref, computed } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox.vue';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const commonStore = commonDataStore();
const store = useProjectStore();
const router = useRouter();
const route = useRoute();
const content = ref(null);
const Scrollheights = ref();

let viewportHeight = window.innerHeight;
Scrollheights.value = viewportHeight * 590;
const getScrollWComputed = computed(() => {
  let rootNode = document.documentElement;

  // 获取计算后的样式
  let computedStyle = window.getComputedStyle(rootNode);

  // 读取字体大小（注意这里返回的可能是一个包含单位的字符串，如"16px"）
  let fontSize = computedStyle.fontSize;

  // 如果你需要一个数字值（不带单位）进行计算，你可能需要解析这个字符串
  // 例如，使用正则表达式或split()方法去除单位，并将结果转换为数字
  let fontSizeNumber = parseFloat(fontSize.replace(/[^0-9.-]/g, ''));
  let heights = (fontSizeNumber / 144) * 590;
  return heights;
});
const blankHome = () => {
  store.menuId = null;
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
</script>

<style scoped lang="less">
.copyright-box {
  width: 100%;
  padding: 48px 0;
  padding-bottom: 0px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}
.cultural-bg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}
.copyright-heard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 24px;
  padding: 0 60px;

  .backHome {
    cursor: pointer;
    width: 24px;
    height: 22px;
    margin-left: 0 !important;
  }
  .heard-title {
    width: 196px;
    font-family: 'SourceHanSerifCN-Bold';
    font-size: 32px;
    color: #f1ecdf;
    line-height: 48px;
    display: flex;
    align-items: center;
    img {
      width: 16px;
      height: 32px;
      margin-right: 16px;
      &:last-child {
        margin-left: 16px;
        margin-right: 0 !important;
      }
    }
  }
}
.content-door {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.5;
  margin-top: 10px;
  .iconfonts {
    font-size: 26px;
    color: #fff;
    margin-bottom: 4px;
    line-height: 32px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 32px;
    color: #fff;
    margin-left: 20px;
    padding-bottom: 7px;
  }
}

.copyright-content {
  width: 94%;
  height: 700px;
  background: #e8e4d9;
  border: 4px #e8e4d9 solid;
  margin: 0 auto;
  position: relative;
  clip-path: polygon(
    0 12px,
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
  .border {
    width: 100%;
    height: 100%;
    background: #4f6e5c;
    position: absolute;
    top: 0;
    clip-path: polygon(
      0 12px,
      12px 0,
      calc(100% - 12px) 0,
      100% 12px,
      100% calc(100% - 12px),
      calc(100% - 12px) 100%,
      12px 100%,
      0 calc(100% - 12px),
      0 12px,
      2px calc(12px + 0.83px),
      2px calc(100% - 12px - 0.83px),
      calc(12px + 0.83px) calc(100% - 2px),
      calc(100% - 12px - 0.83px) calc(100% - 2px),
      calc(100% - 2px) calc(100% - 12px - 0.83px),
      calc(100% - 2px) calc(12px + 0.83px),
      calc(100% - 12px - 0.83px) 2px,
      calc(12px + 0.83px) 2px,
      2px calc(12px + 0.83px)
    );
  }
  :deep(.unit-exbit-null-remarks-info) {
    margin-left: 60px;
    margin-right: 30px;
    margin-top: 48px;
    width: auto;
  }
  ::v-deep .unit-exbi-remarks-info-remarks {
    p {
      color: rgba(33, 57, 47, 0.59);
      font-size: 17px;
      text-align: justify;
      font-weight: normal;
    }
  }
}
.unit-exbit-upbg {
  width: 94%;
  height: 700px;
  background: #e8e4d9;
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translate(-50%);
  border: 4px #e8e4d9 solid;
  .border {
    width: 100%;
    height: 100%;
    background: #4f6e5c;
    clip-path: polygon(
      0 12px,
      12px 0,
      calc(100% - 12px) 0,
      100% 12px,
      100% calc(100% - 12px),
      calc(100% - 12px) 100%,
      12px 100%,
      0 calc(100% - 12px),
      0 12px,
      2px calc(12px + 0.83px),
      2px calc(100% - 12px - 0.83px),
      calc(12px + 0.83px) calc(100% - 2px),
      calc(100% - 12px - 0.83px) calc(100% - 2px),
      calc(100% - 2px) calc(100% - 12px - 0.83px),
      calc(100% - 2px) calc(12px + 0.83px),
      calc(100% - 12px - 0.83px) 2px,
      calc(12px + 0.83px) 2px,
      2px calc(12px + 0.83px)
    );
  }
  clip-path: polygon(
    0 12px,
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px)
  );
}
.copyrightInfo {
  width: 100%;
  height: 100%;
}

.solidBorder-child {
  width: 2px;
  height: 100%;
  background: rgba(57, 93, 72, 0.2);
  border-radius: 1px;
}
::v-deep .templatestyle1-scroll-box-tumb {
  display: flex;
  justify-content: center;
  top: -4px;
  .scrollBar {
    width: 4px;
    height: 100%;
    background: rgba(86, 103, 123, 1);
    border-radius: 4px;
    box-shadow: none;
  }
}
</style>